package com.pj.android.brower.business.bean;

import com.alibaba.fastjson.JSON;
import com.pj.android.brower.util.LngLonUtil;

/**
 * Created by hHui on 2020/3/11 0011.
 *
 */

public class Location {
    private double lng;//经度
    private double lat;//纬度

    public Location(double lng, double lat) {
        this.lng = lng;
        this.lat = lat;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public String toBaiDuStr() {
        double[] result = LngLonUtil.gcj02_To_Bd09(this.lat, this.lng);
        this.lat = result[0];
        this.lng = result[1];

        return JSON.toJSONString(this);
    }

}
